package com.blackcat.moredatasource.controller;

import com.blackcat.moredatasource.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p> 描述 :
 * @author : blackcat
 * @date  : 2021/1/6 11:32
*/
@RestController
public class UserController {


	@Autowired
	private UserService service;

	@RequestMapping("test")
	public String test(){
		System.out.println("数据链接1：" + service.getUserTest());
		System.out.println("数据链接2：" + service.getUserTest2());
		/* print
		数据链接1：User(id=1, name=admin, userCode=admin, password=1111111)
		数据链接2：User(id=1, name=admin22, userCode=admin22, password=1111111)
		*/
		return "ok";
	}
}
